Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

console-control-strings

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-control-strings

A library of cross-platform tested terminal/console command strings for doing things like color and cursor positioning. This is a subset of both ansi and vt100. All control codes included work on both Windows & Unix-like OSes, except where noted.

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.9M
decreased by-57.82%
Maintainers
1
Weekly downloads
 
Created

What is console-control-strings?

The console-control-strings package provides utilities for manipulating the terminal/console using control strings. It allows developers to perform various terminal operations such as moving the cursor, clearing lines, and changing text styles without manually writing ANSI escape codes.

What are console-control-strings's main functionalities?

Cursor Movement

Moves the cursor up by one line. The package provides methods for moving the cursor in various directions.

const ccs = require('console-control-strings');
console.log(ccs.cursorUp(1));

Clearing Lines

Clears the current line where the cursor is located. There are also functions to clear the entire screen or parts of it.

const ccs = require('console-control-strings');
console.log(ccs.eraseLine());

Text Styling

Changes the text color to red and then resets it back to the default. The package includes various text styling options such as colors, bold, underline, etc.

const ccs = require('console-control-strings');
console.log(ccs.color('red') + 'This text will be red' + ccs.color('reset'));

Other packages similar to console-control-strings

FAQs

Package last updated on 15 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc